package com.hkj.configcenter.sample;

import com.hkj.configcenter.core.processor.ConfigBeanFactoryPostProcessor;
import com.hkj.configcenter.core.processor.FieldConfigBeanPostProcessor;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.web.bind.annotation.RestController;

/**
 * 配置中心后台springboot启动类
 */
@RestController
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
public class AppConfigCenterTest {

    @Bean
    public ConfigBeanFactoryPostProcessor getConfigBeanFactoryPostProcessor() {
        return new ConfigBeanFactoryPostProcessor();
    }

    @Bean
    public FieldConfigBeanPostProcessor getFieldConfigBeanPostProcessor() {
        return new FieldConfigBeanPostProcessor();
    }

    public static void main(String[] args) {
        SpringApplication.run(AppConfigCenterTest.class, args);
    }

}
